<?php

$baseUrl = Yii::app()->baseUrl;
$cs = Yii::app()->getClientScript();
$cs->registerCssFile($baseUrl.'/css/jquery-ui.css');
$cs->registerScriptFile($baseUrl.'/js/jquery.min.js');
$cs->registerScriptFile($baseUrl.'/js/jquery-ui.js');
$cs->registerScriptFile($baseUrl.'/js/receipts.js');

?>

<div id="sideNav_wrapper">
<div id="sideNav">
<div class="sideNavFloatContainer">
<div id="search" class="section filterContainer">
<form class="form" id="filter">
<fieldset><legend>Filter</legend>
<ol>
	<li>
	<ol>
		<li><label class="dateField">From</label> <input type="text"
			class="calendar semwal_dtpicker" id="startDate"
			name="startDate" value="<?php echo date('Y-m-d')?>"></li>
		<li><label class="dateField">To</label> <input type="text"
			class="calendar semwal_dtpicker" id="endDate"
			name="endDate" value="<?php echo date('Y-m-d')?>"></li>
	</ol>
	</li>
	<li><select class="qtip" id="filter_selector" name="filter_selector">
		<option value="UNREPORTED">Unreported receipts</option>
		<option value="UNSUBMITTED" selected="selected">Unsubmitted receipts</option>
		<option value="SUBMITTED">Submitted receipts</option>
		<option value="DELETED">Deleted receipts</option>
	</select></li>
	<ul>
		<li class="label-auto"><input type="radio" checked="checked"
			value="UNATTACHED" id="unattachedFilter" class="filter-checkbox" name="attach"> <label
			for="unattachedFilter">Unattached receipts</label></li>
		<li class="label-auto"><input type="radio" 
			value="ATTACHED" id="attachedFilter" class="filter-checkbox" name="attach"> <label
			for="attachedFilter">Attached receipts</label></li>
	</ul>

</ol>
</fieldset>
</form>
</div>
<div class="section">
<div class="button">
<a id="btn_search">Search</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a id="btn_reset" class="reset" href="#">Reset</a></div>
<img  class="hide" id="search_spinner" alt="uploading" src="<?php echo $baseUrl;?>/images/spinner_2x.gif">
</div>

<div id="howDoI" class="section last">
<h3>How do I Expense System?</h3>
<p></p>
<ul>
	<li>How do I <a target="_blank" href="#email">email in receipts?</a></li>
	<li>How do I <a target="_blank" href="#upload">attach receipts?</a></li>
	<li>How do I <a
		title="Automatically create expenses from a receipt image"
		target="_blank" href="#smartscan">turn on SmartScanning?</a></li>
</ul>
<p></p>
<a href="#" target="_blank">More help...</a></div>
</div>
</div>
</div>

<div id="content_wrapper">
<div id="editheader">
<div class="buttons_container hidden" id="receipts_actions"
	style="display: block;">

<div class="floatWrapper">
<div class="floatLeft buttons_container marginBottom"
	id="receipts_buttonsContainer"><!-- Action Buttons -->
<div class="button add" id="button_importButton"><a class="dropdown" href="#">Import from</a>
</div>
<input id="file" name="file" type="file" style="visibility:hidden;" multiple >
<div class="floatLeft marginLeft" id="receipts_selectAll">
<ol class="form one-line">
	<li class="checkbox"><input type="checkbox"
		 id="receipts_selectAllCheckbox"> <label
		for="receipts_selectAllCheckbox">Select All</label></li>
</ol>
</div>
<div class="button undelete" id="receipts_batchUndelete"
	style="display: none;"><a>Undelete</a>
</div>
<div class="button delete" id="receipts_batchDelete"><a href="#" class="iconButton"></a></div>
</div>

<div id="receipts_reportActions" class="buttons_container floatRight"><!-- Report Actions -->
<div class="button add qtip" id="receipts_addReport"><img  class="hide" id="addreport_spinner" alt="uploading" src="<?php echo $baseUrl;?>/images/spinner_2x.gif"><a>Add to Report</a></div>
<div class="floatLeft">
<div class="floatLeft qtip" id="receipts_reportSelectorContainer"><select
	class="reportSelector" id="receipts_reportSelector">
	<option class="optionNone" value="0" selected="selected">(none)</option>
	<?php foreach ($reports as $report):?>
	<option value="<?php echo $report['Id']?>"><?php echo $report['ReportName']?></option>
	<?php endforeach;?>
	<option value="" class="separator" disabled="disabled">----------</option>
	<option value="1">(create new report)</option>
</select></div>
<div class="button qtip hidden" id="receipts_viewReport"
	style="display: block;"><a>View Report</a></div>
<div class="button add qtip hidden" id="receipts_newReport"
	style="display: none;"><a>Add to New Report</a></div>
</div>
</div>
</div>
</div>
</div>

<div class="page-header floatWrapper marginBottom">

<div class="hidden" id="file-uploader-page" style="display: block;">
<div class="qq-uploader">
<div class="qq-upload-drop-area" id="qq-upload-drop-area">
<div class="link" id="reports_popup_import_computer"
	style="position: relative; overflow: hidden; direction: ltr; display: none;"><a>Computer</a><input
	type="file" name="file"style="position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0;"></div>
<span><strong>Quick Import:</strong> Drag and drop receipts here from
your computer.</span></div>
<ul class="qq-upload-list hidden"></ul>
 <span id="spinter-uploading" style="display: none;"><img  alt="uploading" src="<?php echo $baseUrl;?>/images/spinner_2x.gif">Uploading... </span>
</div>
</div>
</div>
<div class="floatWrapper" id="allReceiptsContainer">
<?php $this->renderPartial('search',array(
		'rows'=>$rows,
		'page'=>$page,
		'limit'=>$limit,
		'totalItem'=>$totalItem
		));?>
</div>
</div>

